<?
include ('../variables.php');
include ('../sessions.php');

$webDIR="login";
$save_type="MySQL";


$dbh = get_master_connect();
if (!$dbh) {
		echo "We are sorry but we cannot process your request at the moment<BR>";
		exit_now();
}
if((getenv(REQUEST_METHOD) == "GET")){
	$id=$HTTP_GET_VARS[id];
	$userName = $HTTP_GET_VARS[username];
	if(!$id) exit('nqma id');
	$SQL="select * from resellers where id='29';";
	$result=@mysql_db_query($session_db_name,$SQL,$dbh) or die("no res:$SQL");
	$row=mysql_fetch_row($result) or die("no row: $SQL");
	
	//$userName = $row[reseller];
	$passWord=$row[password];			
								
	kill_old_sessions();
//	$sid = session_get_unique_id();
	$errorMsg = "";
	$statusMsg = "";
	$memberAuthenticated = "yes";
	$resellerCountry = get_reseller_country($id);
//	session_register_(array(errorMsg, statusMsg,memberAuthenticated,userName,passWord,id,resellerCountry), sid);
//	session_save(sid);
	$params[sid] = $sid;
	$params[action] = 1;
	$url="$baseURL/$webDIR/?".encode_params($params);
	header("Location: $url");
	exit();
}

?>
